import kotlinx.browser.document
import openfl.display.Sprite
import openfl.display.Stage
import openfl.text.TextField
import openfl.text.TextFormat

@JsExport
class App : Sprite() {
    init {
        val txt = TextField()
        txt.width = 200.0
        txt.defaultTextFormat = TextFormat("Courier New", 20, 0xffffffff)
        txt.text = "Hello World!"
        addChild(txt)
    }
}

fun main() {
    val stage = Stage(550, 400, 0x00000000, App::class.js)
    document.body?.appendChild(stage.element)
}